package com.sensen.controller;

import com.sensen.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Administrator on 2017/6/10.
 */
@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Autowired
    RestTemplate restTemplate;
    @Autowired
    HelloService helloService;

    @RequestMapping("/hello")
    public String helloConsumer(){
       /* reture String s = restTemplate
                .getForEntity("http://Hello-service/helloserver/hello",String.class)
                .getBody();*/

       return helloService.helloService();
    }

}
